﻿/// <reference path="../typings/requirejs/require.d.ts" />

import Module = Sustainalytics.Module;


require.config({
    paths:
    {
        'jquery': ['Scripts/libs/jquery-1.9.0.min'],
        'Scripts/libs/jquery': ['Scripts/libs/jquery-1.9.0.min'],
        'Scripts/libs/jquery-ui': ['Scripts/libs/jquery-ui-1.10.4.min'],
        'Scripts/libs/jquery.signalR': ['Scripts/libs/jquery.signalR-2.1.1.min'],

        'Scripts/libs/angular': ['Scripts/libs/angular.min'],
        'Scripts/libs/angular-route': ['Scripts/libs/angular-route.min'],
        'Scripts/libs/angular-animate': ['Scripts/libs/angular-animate.min'],
        'Scripts/libs/angular-ng-grid': ['Scripts/libs/angular-ng-grid'],
        'Scripts/libs/angular-resource': ['Scripts/libs/angular-resource.min'],
        'Scripts/libs/angular-sanitize': ['Scripts/libs/angular-sanitize.min'],
        'Scripts/libs/angular-ui': ['Scripts/libs/angular-ui.min'],
        'Scripts/libs/angular-file-upload-shim': ['Scripts/libs/angular-file-upload-shim.min'],
        'Scripts/libs/angular-file-upload': ['Scripts/libs/angular-file-upload.min'],

        'Scripts/libs/moment': ['Scripts/libs/moment.min'],
        'Scripts/libs/sortable': ['Scripts/libs/sortable'],
        'Scripts/libs/ui-bootstrap-tpls': ['Scripts/libs/ui-bootstrap-tpls.min'],
        'Scripts/libs/chart': ['Scripts/libs/chart'],
        'Scripts/libs/select2': ['Scripts/libs/select2.min'],
        'Scripts/libs/angular-flexslider': ['Scripts/libs/angular-flexslider'],
        'Scripts/libs/jquery.flexslider': ['Scripts/libs/jquery.flexslider'],

        'amcharts': 'Scripts/libs/amcharts',
        'amcharts.themes.light': 'Scripts/libs/light',
        'amcharts.serial': 'Scripts/libs/serial',
        'amcharts.xy': 'Scripts/libs/xy'
    },
    // mure
    shim:
    {
        'Scripts/libs/toastr':
        {
            deps: ['jquery'],
            exports: 'toastr'
        },

        'amcharts.themes.light':
        {
            deps: ['amcharts'],
            exports: 'AmCharts',
            init: function () {
                AmCharts['isReady'] = true;
            }
        },

        'amcharts.serial':
        {
            deps: ['amcharts', 'amcharts.themes.light'],
            exports: 'AmCharts',
            init: function () {
                AmCharts['isReady'] = true;
            }
        },

        'amcharts.xy':
        {
            deps: ['amcharts', 'amcharts.themes.light'],
            exports: 'AmCharts',
            init: function () {
                AmCharts['isReady'] = true;
            }
        }
    }
});



/*
TODO:
    app.core:
            'Scripts/libs/jquery.signalR',
            '/lrtmserv/signalr/hubs',
            '/screeningtoolserv/signalr/hubs',
*/


Module.ModuleLoaderConfig.modules =
{
    'shims':
    {
        files:
        [
            { path: 'Scripts/libs/json3.min', browser: [{ name: 'MSIE', vers: '7', comp: 'lte' }] },
            { path: 'Scripts/libs/es5-shim', browser: [{ name: 'MSIE', vers: '8', comp: 'lte' }] },
            { path: 'Scripts/libs/html5shiv.min', browser: [{ name: 'MSIE', vers: '8', comp: 'lte' }] },
            { path: 'Scripts/libs/html5shiv-printshiv.min', browser: [{ name: 'MSIE', vers: '8', comp: 'lte' }] },
            { path: 'Scripts/libs/excanvas', browser: [{ name: 'MSIE', vers: '8', comp: 'lte' }] },
            { path: 'Scripts/app/modules/_Libs/Shims/ie8Fixes', browser: [{ name: 'MSIE', vers: '8', comp: 'lte' }] },
            { path: 'Scripts/app/modules/_Libs/Shims/ie9Fixes', browser: [{ name: 'MSIE', vers: '9', comp: 'lte' }] }
        ],
        require: []
    }, //

    'jquery':
    {
        files:
        [
            'Scripts/libs/jquery',
            'Scripts/libs/jquery-ui',
            'Scripts/libs/jquery-ui-slider-pips',
            'Scripts/libs/toastr'
        ],
        require: ['shims']
    }, //

    'angular':
    {
        files:
        [
            'Scripts/libs/angular',
            'Scripts/libs/angular-route',
            'Scripts/libs/angular-animate',
            'Scripts/libs/angular-ng-grid',
            'Scripts/libs/angular-resource',
            'Scripts/libs/angular-sanitize',
            'Scripts/libs/angular-ui',
            'Scripts/libs/angular-file-upload-shim',
            'Scripts/libs/angular-file-upload'
        ],
        require: ['jquery', 'shims']
    }, //

    'libs':
    {
        files:
        [
            'Scripts/libs/moment',
            'Scripts/libs/sortable',
            'Scripts/libs/ui-bootstrap-tpls',
            'Scripts/libs/chart',
            'Scripts/libs/select2'
        ],
        require: ['angular', 'jquery']
    }, //

    'amcharts':
    {
        files:
        [
            'amcharts',
            'amcharts.serial',
            'amcharts.xy',
            'amcharts.themes.light',
        ],
        require: ['jquery']
    }, //

    'modules':
    {
        files:
        [
            'Scripts/app/modules/Common/module.angular',
            'Scripts/app/modules/BlockUi/module.angular',
            'Scripts/app/modules/Security.Authentication/module.angular',
            'Scripts/app/modules/Routing/module.angular',
            'Scripts/app/modules/Navigation/module.angular',
            'Scripts/app/modules/ScreeningTool/module.angular',
            'Scripts/app/modules/ScreeningTool.Security/module.angular',
            'Scripts/app/modules/LRTM/module.angular',
            'Scripts/app/modules/LRTMTest/module.angular',
            'Scripts/app/modules/Pager/module.angular',
            'Scripts/app/modules/SearchBoxModule/module.angular',
            'Scripts/app/modules/Charts/module.angular',
            'Scripts/app/modules/Company/module.angular',
            'Scripts/app/modules/CompanySearchModule/module.angular',
            'Scripts/app/modules/Portfolio/module.angular',
            'Scripts/app/modules/CompanyOverview/module.angular',
            'Scripts/app/modules/Research/module.angular',
            'Scripts/app/modules/GCCS/module.angular',
            'Scripts/app/modules/GCCS.Security/module.angular',
            'Scripts/app/modules/PI/module.angular',
            'Scripts/app/modules/PI.Security/module.angular',
            'Scripts/app/modules/Home/module.angular',
            'Scripts/app/modules/News/module.angular',
            'Scripts/app/modules/Events/module.angular',
            'Scripts/app/modules/Claims/module.angular',
            'Scripts/app/modules/Insights/module.angular',
            'Scripts/app/modules/EsgRatings/module.angular',
            'Scripts/app/modules/Governance/module.angular',
            'Scripts/app/modules/MostActiveReports/module.angular',
            'Scripts/app/modules/MostRecentActivity/module.angular',
            'Scripts/app/modules/ScrollPager/module.angular',
            'Scripts/app/modules/Controversies/module.angular'
        ],
        require: ['angular']
    }, //

    'app.core':
    {
        files:
        [
            'Scripts/libs/jquery.signalR',
            '/lrtmserv/signalr/hubs',
            '/screeningtoolserv/signalr/hubs',

            'Scripts/app/modules/Common/models/userInfoModel',
            'Scripts/app/modules/Common/models/PagedList',
            'Scripts/app/modules/Common/models/PagingOptions',
            'Scripts/app/modules/Common/models/AsyncOperation',
            'Scripts/app/modules/Common/models/ListOptions',
            'Scripts/app/modules/Common/models/AccountFeature',

            'Scripts/app/modules/Common/utilities/DictionaryItem',
            'Scripts/app/modules/Common/utilities/Dictionary',

            'Scripts/app/modules/Common/services/notificationFactory',
            'Scripts/app/modules/Common/services/numberUtilityService',
            'Scripts/app/modules/Common/services/staticObjects',

            'Scripts/app/modules/Common/filters/dateQuarterFilter',

            'Scripts/app/modules/Common/directives/serverError',
            'Scripts/app/modules/Common/directives/compile',
            'Scripts/app/modules/Common/directives/loading',
            'Scripts/app/modules/Common/directives/hideLogin'
        ],
        require: ['angular', 'jquery', 'libs', 'modules']
    }, //

    'BlockUi':
    {
        files:
        [
        //<!--BlockUi-- >            
            'Scripts/app/modules/BlockUi/models/BlockUiScope',
            'Scripts/app/modules/BlockUi/controllers/BlockUiController',
            'Scripts/app/modules/BlockUi/directives/BlockUiDirective'
        ],
        require: ['app.core']
    }, //

    'Security.Authentication':
    {
        files:
        [
            'Scripts/app/modules/Security.Authentication/models/AuthData',
            'Scripts/app/modules/Security.Authentication/models/ChangePassword',
            'Scripts/app/modules/Security.Authentication/models/RootScope',
            'Scripts/app/modules/Security.Authentication/models/UserCredentials',
            'Scripts/app/modules/Security.Authentication/interfaces/IAuthenticationService',
            'Scripts/app/modules/Security.Authentication/interfaces/IUserInfoService',
            'Scripts/app/modules/Security.Authentication/services/AuthenticationHttpInterceptor',
            'Scripts/app/modules/Security.Authentication/services/AuthenticationService',
            'Scripts/app/modules/Security.Authentication/services/UserInfoService',
            'Scripts/app/modules/Security.Authentication/controllers/AccountController'
        ],
        require: ['app.core']
    }, //

    'Routing':
    {
        files:
        [
            'Scripts/app/modules/Routing/models/RouteSecurity.js',
            'Scripts/app/modules/Routing/models/RouteSecurityResource.js',
            'Scripts/app/modules/Routing/interfaces/IRoutingService.js',
            'Scripts/app/modules/Routing/interfaces/IRoutingServiceProvider.js',
            'Scripts/app/modules/Routing/interfaces/IRouteSecurityService.js',
            'Scripts/app/modules/Routing/services/RoutingService.js',
            'Scripts/app/modules/Routing/services/RoutingServiceProvider.js'
        ],
        require: ['app.core', 'Security.Authentication']
    }, //

    'Navigation':
    {
        files:
        [
            'Scripts/app/modules/Navigation/models/SiteMapNodeRoute',
            'Scripts/app/modules/Navigation/models/ISiteMapNode',
            'Scripts/app/modules/Navigation/models/SiteMapNode',
            'Scripts/app/modules/Navigation/models/SiteMap',
            'Scripts/app/modules/Navigation/interfaces/INavigationService',
            'Scripts/app/modules/Navigation/interfaces/ISiteMapNodeRouteResolverService',
            'Scripts/app/modules/Navigation/services/SiteMapNodeRouteResolverService',
            'Scripts/app/modules/Navigation/services/NavigationService',
            'Scripts/app/modules/Navigation/controllers/NavigationMenuController',
            'Scripts/app/modules/Navigation/directives/NavigationMenuDirective'
        ],
        require: ['app.core', 'Routing']
    }, //

    'ScreeningTool':
    {
        files:
        [
            'Scripts/app/modules/ScreeningTool/models/ResultOutputFilter',

            'Scripts/app/modules/ScreeningTool/controller/screeningTool',

            'Scripts/app/modules/ScreeningTool/filters/filters',

            'Scripts/app/modules/ScreeningTool/models/ExportDetailsDto',
            'Scripts/app/modules/ScreeningTool/models/ExportDetailsFilter',
            'Scripts/app/modules/ScreeningTool/models/GetRunResultDto',
            'Scripts/app/modules/ScreeningTool/models/IndicatorOptions',

            'Scripts/app/modules/ScreeningTool/services/ScreeningToolServBackend',
            'Scripts/app/modules/ScreeningTool/services/CriteriaSearchBoxServiceAdapter',
            'Scripts/app/modules/ScreeningTool/services/UniverseSearchBoxServiceAdapter',

            'Scripts/app/modules/ScreeningTool/directives/criteriaType4Slider',
            'Scripts/app/modules/ScreeningTool/directives/chart',
            'Scripts/app/modules/ScreeningTool/directives/slider',
            'Scripts/app/modules/ScreeningTool/directives/slider_criteria_type_5',
            'Scripts/app/modules/ScreeningTool/directives/numberFilter',
            'Scripts/app/modules/ScreeningTool/directives/enterKeypress',
        ],
        require: ['app.core', 'Portfolio', 'LRTM']
    }, //

    'ScreeningTool.Security':
    {
        files:
        [
        // models
            'Scripts/app/modules/ScreeningTool.Security/models/ScreeningToolCompanyInfoTabPermissions',
            'Scripts/app/modules/ScreeningTool.Security/models/ScreeningToolEsgPermissions',
            'Scripts/app/modules/ScreeningTool.Security/models/ScreeningToolPermissions',

        // interfaces
            'Scripts/app/modules/ScreeningTool.Security/interfaces/IScreeningToolPermissionsService',

        // services
            'Scripts/app/modules/ScreeningTool.Security/services/ScreeningToolPermissionsService',
            'Scripts/app/modules/ScreeningTool.Security/services/ScreeningToolRouteSecurityService'
        ],
        require: ['app.core']
    }, //

    'LRTM':
    {
        files:
        [
        //<!--Long Running Task Manager-- >
        //<!--<script src="lrtmserv/signalr/hubs" >< / script >-- >            
            'Scripts/app/modules/LRTM/models/LongRunningTaskError',
            'Scripts/app/modules/LRTM/models/LongRunningTaskInstancePost',
            'Scripts/app/modules/LRTM/models/LongRunningTaskInstance',
            'Scripts/app/modules/LRTM/models/LongRunningTaskInstanceStatus',
            'Scripts/app/modules/LRTM/models/LongRunningTaskInstanceStatusEnum',
            'Scripts/app/modules/LRTM/models/LongRunningTaskStatus',
            'Scripts/app/modules/LRTM/models/LongRunningTaskTypeEnum',
            'Scripts/app/modules/LRTM/models/LongRunningTaskManagerSettingsDto',
            'Scripts/app/modules/LRTM/interfaces/ILongRunningTaskService',
            'Scripts/app/modules/LRTM/interfaces/ILongRunningTaskManagerService',
            'Scripts/app/modules/LRTM/interfaces/ILongRunningTaskManagerSettingsService',
            'Scripts/app/modules/LRTM/services/LongRunningTaskService',
            'Scripts/app/modules/LRTM/services/LongRunningTaskManagerService',
            'Scripts/app/modules/LRTM/services/LongRunningTaskManagerSettingsService',
            'Scripts/app/modules/LRTM/directives/LongRunningTaskManagerDirective',
            'Scripts/app/modules/LRTM/controller/LongRunningTaskManagerController'
        ],
        require: ['app.core']
    }, //

    'LRTMTest':
    {
        files:
        [
        //<!--Long Running Task Manager - Test-- >            
            'Scripts/app/modules/LRTMTest/controller/LongRunningTaskManagerTestController'
        ],
        require: ['app.core', 'LRTM']
    }, //

    'Pager':
    {
        files:
        [
        //<!--Pager-- >            
            'Scripts/app/modules/Pager/controller/PagerController',
            'Scripts/app/modules/Pager/directives/PagerDirective'
        ],
        require: ['app.core']
    }, //

    'SearchBoxModule':
    {
        files:
        [
        //<!--Search Box-- >            
            'Scripts/app/modules/SearchBoxModule/interfaces/ISearchBoxService',
            'Scripts/app/modules/SearchBoxModule/controller/SearchBoxController',
            'Scripts/app/modules/SearchBoxModule/directives/SearchBoxDirective'
        ],
        require: ['app.core']
    }, //

    'Charts':
    {
        files:
        [
        //<!--Charts-- >            
        //<!--Serial Chart-- >
            'Scripts/app/modules/Charts/models/SerialChartOptions',
            'Scripts/app/modules/Charts/controller/SerialChartController',
            'Scripts/app/modules/Charts/directives/SerialChartDirective',
        //<!--XY Chart-- >
            'Scripts/app/modules/Charts/models/XYChartOptions',
            'Scripts/app/modules/Charts/controller/XYChartController',
            'Scripts/app/modules/Charts/directives/XYChartDirective'
        ],
        require: ['app.core', 'amcharts']
    }, //

    'Company':
    {
        files:
        [
        //<!--Company-- >            
            'Scripts/app/modules/Company/models/CorporateDataBasicDto',
            'Scripts/app/modules/Company/models/CorporateDataExtendedDto',
            'Scripts/app/modules/Company/interfaces/ICompanyService',
            'Scripts/app/modules/Company/interfaces/ICompanyBasedScope',
            'Scripts/app/modules/Company/services/CompanyService',
            'Scripts/app/modules/Company/controller/CompanyListController'
        ],
        require: ['app.core']
    }, //

    'CompanySearch':
    {
        files:
        [
        //<!--Company Search-- >            
            'Scripts/app/modules/CompanySearchModule/services/CompanySearchBoxServiceAdapter',
            'Scripts/app/modules/CompanySearchModule/controller/CompanySearchController'
        ],
        require: ['app.core', 'SearchBoxModule', 'Company']
    }, //

    'Portfolio':
    {
        files:
        [
        //<!--PortfolioCompany-- >            
            'Scripts/app/modules/Portfolio/models/PortfolioCompanyDto',
            'Scripts/app/modules/Portfolio/models/PortfolioCompanyFilterDto',
            'Scripts/app/modules/Portfolio/interfaces/IPortfolioCompanyService',
            'Scripts/app/modules/Portfolio/services/PortfolioCompanyService',

        //<!--Portfolio-- >
            'Scripts/app/modules/Portfolio/models/PortfolioDto',
            'Scripts/app/modules/Portfolio/models/PortfolioAddDto',
            'Scripts/app/modules/Portfolio/models/PortfolioFilterDto',
            'Scripts/app/modules/Portfolio/models/PortfolioSharingDto',
            'Scripts/app/modules/Portfolio/models/PortfolioUploadDto',
            'Scripts/app/modules/Portfolio/interfaces/IPortfolioService',
            'Scripts/app/modules/Portfolio/services/PortfolioService',
            'Scripts/app/modules/Portfolio/controller/PortfolioListController',
            'Scripts/app/modules/Portfolio/controller/PortfolioAddController',
            'Scripts/app/modules/Portfolio/controller/PortfolioUploadController',
            'Scripts/app/modules/Portfolio/controller/PortfolioCheckController',
            'Scripts/app/modules/Portfolio/controller/PortfolioSearchController',
            'Scripts/app/modules/Portfolio/services/PortfolioSearchService',
            'Scripts/app/modules/Portfolio/services/PortfolioSearchBoxServiceAdapter',
            'Scripts/app/modules/Portfolio/services/PortfolioSharedSearchBoxServiceAdapter',
            'Scripts//app/modules/Portfolio//controller/PortfolioOverviewController',
            'Scripts/app/modules/Portfolio/models/PortfolioRenameDto',
            'Scripts/app/modules/Portfolio/controller/ShowErrorsInModalController'
        ],
        require: ['app.core', 'LRTM']
    }, //

    'Research':
    {
        files:
        [
        //<!--Research common functionality-- >
            'Scripts/app/modules/Research/directives/enterKeypress',
            'Scripts/app/modules/Research/controller/ResearchPageController',
            'Scripts/app/modules/Research/controller/ResearchMenuController',
            'Scripts/app/modules/Research/controller/ResearchMenuIndexController',
            'Scripts/app/modules/Research/controller/CompanyResearchController',
            'Scripts/app/modules/Research/directives/CompanyResearchDirective',
        ],
        require: ['app.core', 'MostRecentActivity', 'CompanyOverview', 'Portfolio']
    }, //

    'CompanyOverview':
    {
        files:
        [
        //<!--Company Overview-- >            
            'Scripts/app/modules/CompanyOverview/controller/CompanyOverviewController',
            'Scripts/app/modules/CompanyOverview/controller/CompanyAddToPortfolioController'
        ],
        require: ['app.core', 'MostRecentActivity', 'Portfolio']
    }, //

    'GCCS.Security':
    {
        files:
        [
        // models
            'Scripts/app/modules/GCCS.Security/models/GCPermissions',

        // interfaces
            'Scripts/app/modules/GCCS.Security/interfaces/IGCPermissionsService',

        // services
            'Scripts/app/modules/GCCS.Security/services/GCPermissionsService',
            'Scripts/app/modules/GCCS.Security/services/GCRouteSecurityService',
            'Scripts/app/modules/GCCS.Security/services/GCMultiCompanyRouteSecurityService'
        ],
        require: ['app.core']
    }, //

    'GCCS':
    {
        files:
        [
        //<!--GCCS-- >            
        //<!--GCCS - models-- >
            'Scripts/app/modules/GCCS/models/GCAssessment',
            'Scripts/app/modules/GCCS/models/GCCompanyPrincipleViews',
            'Scripts/app/modules/GCCS/models/GCCompanyProfileBasicDto',
            'Scripts/app/modules/GCCS/models/GCCompanyProfileDto',
            'Scripts/app/modules/GCCS/models/GCOverallCompanySummaryDto',
            'Scripts/app/modules/GCCS/models/GCOverallCompanySummaryExtendedDto',
            'Scripts/app/modules/GCCS/models/GCPillarTemplateDto',
            'Scripts/app/modules/GCCS/models/GCPrincipleConclusionDto',
            'Scripts/app/modules/GCCS/models/GCPrincipleEventIndicatorDto',
            'Scripts/app/modules/GCCS/models/GCPrincipleEventIndicatorImpactDto',
            'Scripts/app/modules/GCCS/models/GCPrincipleEventIndicatorManagementDto',
            'Scripts/app/modules/GCCS/models/GCPrincipleSummaryDto',
            'Scripts/app/modules/GCCS/models/GCPrincipleTemplateDto',
        //<!--GCCS - interfaces-- >
            'Scripts/app/modules/GCCS/interfaces/IGCOverallCompanySummaryExtendedService',
            'Scripts/app/modules/GCCS/interfaces/IGCOverallCompanySummaryService',
            'Scripts/app/modules/GCCS/interfaces/IGCPrincipleConclusionService',
            'Scripts/app/modules/GCCS/interfaces/IGCPrincipleEventIndicatorImpactService',
            'Scripts/app/modules/GCCS/interfaces/IGCPrincipleEventIndicatorManagementService',
            'Scripts/app/modules/GCCS/interfaces/IGCPrincipleEventIndicatorService',
            'Scripts/app/modules/GCCS/interfaces/IGCPrincipleSummaryService',
        //<!--GCCS - utility-- >
            'Scripts/app/modules/GCCS/utility/GCUtility',
        //<!--GCCS - services-- >
            'Scripts/app/modules/GCCS/services/GCOverallCompanySummaryExtendedService',
            'Scripts/app/modules/GCCS/services/GCOverallCompanySummaryService',
            'Scripts/app/modules/GCCS/services/GCPrincipleConclusionService',
            'Scripts/app/modules/GCCS/services/GCPrincipleEventIndicatorImpactService',
            'Scripts/app/modules/GCCS/services/GCPrincipleEventIndicatorManagementService',
            'Scripts/app/modules/GCCS/services/GCPrincipleEventIndicatorService',
            'Scripts/app/modules/GCCS/services/GCPrincipleSummaryService',
        //<!--GCCS - controllers-- >
            'Scripts/app/modules/GCCS/controller/GCAnalysisOfCompanyManagementController',
            'Scripts/app/modules/GCCS/controller/GCAnalysisOfIssueController',
            'Scripts/app/modules/GCCS/controller/GCAssessmentSummaryAndConclusionsController',
            'Scripts/app/modules/GCCS/controller/GCCompanyController',
            'Scripts/app/modules/GCCS/controller/GCCompanyPrincipleController',
            'Scripts/app/modules/GCCS/controller/GCMultiCompanyReportController'
        ],
        require: ['app.core', 'MostRecentActivity', 'LRTM', 'GCCS.Security']
    }, //

    'PI.Security':
    {
        files:
        [
        // models
            'Scripts/app/modules/PI.Security/models/PIPermissions',

        // interfaces
            'Scripts/app/modules/PI.Security/interfaces/IPIPermissionsService',

        // services
            'Scripts/app/modules/PI.Security/services/PIRouteSecurityServices',
            'Scripts/app/modules/PI.Security/services/PIPermissionsService'
        ],
        require: ['app.core']
    }, //

    'PI':
    {
        files:
        [
        //<!--Product Involvement-- >            

            'Scripts/app/modules/PI/models/PIAssessmentDetailsDto',
            'Scripts/app/modules/PI/models/PIAssessmentListDto',
            'Scripts/app/modules/PI/models/PICompanyIndicatorDto',
            'Scripts/app/modules/PI/models/PIDataSourceDto',
            'Scripts/app/modules/PI/models/PIIndicatorAssessmentDto',
            'Scripts/app/modules/PI/models/PIIndicatorCategoryDto',
            'Scripts/app/modules/PI/models/PIIndicatorDto',
            'Scripts/app/modules/PI/models/PILevelOfInvolvementDto',

            'Scripts/app/modules/PI/interfaces/ICompanyAssessmentService',

            'Scripts/app/modules/PI/services/CompanyAssessmentService',

            'Scripts/app/modules/PI/controller/CompanyAssessmentListController',
            'Scripts/app/modules/PI/controller/CompanyAssessmentDetailsController',
        ],
        require: ['app.core', 'MostRecentActivity', 'LRTM', 'PI.Security']

    }, //

    'Home':
    {
        files:
        [
        //<!--Home-- >            
            'Scripts/app/modules/Home/models/NewsDashboardDto',
            'Scripts/app/modules/Home/interfaces/IHomeService',
            'Scripts/app/modules/Home/services/HomeService',
            'Scripts/app/modules/Home/controller/HomeController',
            'Scripts/app/modules/Home/models/EventDashboardDto',
            'Scripts/app/modules/Home/models/PortfolioDashboardDto',
        ],
        require: ['app.core', 'MostActiveReports', 'MostRecentActivity', 'News', 'Events', 'Insights', 'Company', 'CompanySearch', 'LRTM', 'GCCS.Security', 'PI.Security', 'ScreeningTool.Security', 'Portfolio']
    }, //

    'News':
    {
        files:
        [
        //<!--News-- >            
            'Scripts/app/modules/News/models/NewsDto',
            'Scripts/app/modules/News/interfaces/INewsService',
            'Scripts/app/modules/News/services/NewsService',
            'Scripts/app/modules/News/controller/NewsListController',
            'Scripts/app/modules/News/controller/NewsViewController'
        ],
        require: ['app.core']
    }, //

    'Events':
    {
        files:
        [
        //<!--Events calendar-- >            
            'Scripts/app/modules/Events/models/EventDto',
            'Scripts/app/modules/Events/interfaces/IEventService',
            'Scripts/app/modules/Events/services/EventService',
            'Scripts/app/modules/Events/controller/EventListController',
            'Scripts/app/modules/Events/controller/EventViewController'
        ],
        require: ['app.core']
    }, //

    'Claims':
    {
        files:
        [
        //<!--Claims-- >            
            'Scripts/app/modules/Claims/models/ActiveResourcesDto',
            'Scripts/app/modules/Claims/interfaces/IClaimsAuthorizationService',
            'Scripts/app/modules/Claims/services/ClaimsAuthorizationService',
            'Scripts/app/modules/Claims/models/ResourceParameters',
        ],
        require: ['app.core']
    }, //

    'Insights':
    {
        files:
        [
        //<!--Insights-- >            
            'Scripts/app/modules/Insights/models/InsightDto',
            'Scripts/app/modules/Insights/models/InsightFilterDto',
            'Scripts/app/modules/Insights/interfaces/IInsightsService',
            'Scripts/app/modules/Insights/services/InsightsService',
            'Scripts/app/modules/Insights/controller/InsightsListController',
            'Scripts/app/modules/Insights/controller/InsightsViewController'
        ],
        require: ['app.core', 'LRTM']
    }, //

    'EsgRatings':
    {
        files:
        [
        //<!--ESG Ratings-- >
        //<!--Models-- >                
            'Scripts/app/modules/EsgRatings/models/EsgControversyIndicatorDto',
            'Scripts/app/modules/EsgRatings/models/EsgCorporateMonthlyScoreDto',
            'Scripts/app/modules/EsgRatings/models/EsgCorporateScoreDto',
            'Scripts/app/modules/EsgRatings/models/EsgEnvironmentHistoricalPerformanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgEnvironmentSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgGovernanceHistoricalPerformanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgGovernanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgHistoricalPerformanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgIndustryLeadPersonnelDto',
            'Scripts/app/modules/EsgRatings/models/EsgOverallAssessmentDto',
            'Scripts/app/modules/EsgRatings/models/EsgOverallHistoricalPerformanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgOverallPerformanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgOverallScoreSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgPercentileSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgRelativePositionDto',
            'Scripts/app/modules/EsgRatings/models/EsgRelativePositionSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgSocialHistoricalPerformanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgSocialSummaryDto',
            'Scripts/app/modules/EsgRatings/models/EsgViewNames',
            'Scripts/app/modules/EsgRatings/models/KeyEsgIssueAssessmentDto',
            'Scripts/app/modules/EsgRatings/models/KeyEsgIssueDto',
            'Scripts/app/modules/EsgRatings/models/KeyEsgIssueIndicatorDto',
            'Scripts/app/modules/EsgRatings/models/KeyEsgIssueValueDto',
            'Scripts/app/modules/EsgRatings/models/KeyEsgIssueValueLevelEnum',
            'Scripts/app/modules/EsgRatings/models/SerialChartEsgMonthlyScore',
            'Scripts/app/modules/EsgRatings/models/KeyEsgIssueInfo',

            'Scripts/app/modules/EsgRatings/models/Common/EsgPositionEnum',
            'Scripts/app/modules/EsgRatings/models/Common/EsgThemeEnum',

            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpControversyDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpControversyEventIndicatorDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpControversyLevelEnum',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpIndicatorClusterDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpIndicatorDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpIndicatorOutlookTypeEnum',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpIndicatorScoreDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpIndicatorTicboxDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpIndicatorTrendTypeEnum',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpNonRatedIndicatorValueDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgRpNonRatedIndicator',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgThemeOverallPerformanceSummaryDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgThemeOverallScoreSummaryDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgThemePercentileSummaryDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgThemeRelativePositionSummaryDto',
            'Scripts/app/modules/EsgRatings/models/RpIndicators/EsgThemeWeightSummaryDto',


        //<!--Interfaces-- >
            'Scripts/app/modules/EsgRatings/interfaces/IEsgControversyIndicatorService',
            'Scripts/app/modules/EsgRatings/interfaces/IEsgHistoricalPerformanceSummaryService',
            'Scripts/app/modules/EsgRatings/interfaces/IEsgIndustryLeadPersonnelService',
            'Scripts/app/modules/EsgRatings/interfaces/IEsgOverallAssessmentService',
            'Scripts/app/modules/EsgRatings/interfaces/IEsgOverallPerformanceSummaryService',
            'Scripts/app/modules/EsgRatings/interfaces/IEsgRelativePositionService',
            'Scripts/app/modules/EsgRatings/interfaces/IKeyEsgIssueAssessmentService',
            'Scripts/app/modules/EsgRatings/interfaces/IKeyEsgIssueIndicatorService',
            'Scripts/app/modules/EsgRatings/interfaces/IKeyEsgIssueValueService',

            'Scripts/app/modules/EsgRatings/interfaces/RpIndicators/IEsgRpIndicatorClusterService',
            'Scripts/app/modules/EsgRatings/interfaces/RpIndicators/IEsgRpIndicatorService',
            'Scripts/app/modules/EsgRatings/interfaces/RpIndicators/IEsgThemeOverallPerformanceSummaryService',
            'Scripts/app/modules/EsgRatings/interfaces/RpIndicators/IEsgThemeScope',


        //<!--Utility-- >
            'Scripts/app/modules/EsgRatings/utility/EsgUtility',


        //<!--Services-- >
            'Scripts/app/modules/EsgRatings/services/EsgControversyIndicatorService',
            'Scripts/app/modules/EsgRatings/services/EsgHistoricalPerformanceSummaryService',
            'Scripts/app/modules/EsgRatings/services/EsgIndustryLeadPersonnelService',
            'Scripts/app/modules/EsgRatings/services/EsgOverallAssessmentService',
            'Scripts/app/modules/EsgRatings/services/EsgOverallPerformanceSummaryService',
            'Scripts/app/modules/EsgRatings/services/EsgRelativePositionService',
            'Scripts/app/modules/EsgRatings/services/KeyEsgIssueAssessmentService',
            'Scripts/app/modules/EsgRatings/services/KeyEsgIssueIndicatorService',
            'Scripts/app/modules/EsgRatings/services/KeyEsgIssueValueService',

            'Scripts/app/modules/EsgRatings/services/RpIndicators/EsgRpIndicatorClusterService',
            'Scripts/app/modules/EsgRatings/services/RpIndicators/EsgRpIndicatorService',
            'Scripts/app/modules/EsgRatings/services/RpIndicators/EsgThemeOverallPerformanceSummaryService',


        //<!--Controllers-- >
            'Scripts/app/modules/EsgRatings/controller/AnalystViewController',
            'Scripts/app/modules/EsgRatings/controller/EnvironmentController',
            'Scripts/app/modules/EsgRatings/controller/EsgController',
            'Scripts/app/modules/EsgRatings/controller/EsgSummary/EsgSummaryController',
            'Scripts/app/modules/EsgRatings/controller/EsgSummary/OverallPerformanceController',
            'Scripts/app/modules/EsgRatings/controller/EsgSummary/RelativePositionController',
            'Scripts/app/modules/EsgRatings/controller/EsgSummary/QualitativePerformanceController',
            'Scripts/app/modules/EsgRatings/controller/EsgSummary/HistoricalPerformanceController',
            'Scripts/app/modules/EsgRatings/controller/GovernanceController',
            'Scripts/app/modules/EsgRatings/controller/SocialController',

            'Scripts/app/modules/EsgRatings/controller/RpIndicators/EsgThemeController',
            'Scripts/app/modules/EsgRatings/controller/RpIndicators/EsgEnvironmentThemeController',
            'Scripts/app/modules/EsgRatings/controller/RpIndicators/EsgSocialThemeController',
            'Scripts/app/modules/EsgRatings/controller/RpIndicators/EsgGovernanceThemeController',
            'Scripts/app/modules/EsgRatings/controller/RpIndicators/EsgThemeOverallPerformanceController',
            'Scripts/app/modules/EsgRatings/controller/RpIndicators/EsgRpIndicatorsController'
        ],
        require: ['app.core', 'Charts', 'MostRecentActivity', 'MostActiveReports', 'LRTM', 'Company']
    }, //

    'Governance':
    {
        files:
        [
        //<!--Governance -- >
        //<!--Models-- >                
            'Scripts/app/modules/Governance/models/GovernanceProfileDto',
            'Scripts/app/modules/Governance/models/GovernanceAlertDto',
            
        //<!--Interfaces-- >
            'Scripts/app/modules/Governance/interfaces/IGovernanceProfileService',

        //<!--Services-- >
            'Scripts/app/modules/Governance/services/GovernanceProfileService',
            
        //<!--Controllers-- >
            'Scripts/app/modules/Governance/controllers/GovernanceProfileController',
        ],
        require: ['app.core', 'LRTM', 'Company', 'Research']
    }, //

    'Controversies':
    {
        files:
        [
            'Scripts/app/modules/Controversies/controllers/ControversiesController'
        ],
        require: ['app.core', 'MostRecentActivity', 'MostActiveReports', 'LRTM', 'Company', 'EsgRatings']
    }, //

    'MostActiveReports':
    {
        files:
        [
            'Scripts/app/modules/MostActiveReports/models/MostActiveReportDto',
            'Scripts/app/modules/MostActiveReports/interfaces/IMostActiveReportService',
            'Scripts/app/modules/MostActiveReports/services/MostActiveReportService',
            'Scripts/app/modules/MostActiveReports/controllers/MostActiveReportController'
        ],
        require: ['app.core']
    }, //

    'MostRecentActivity':
    {
        files:
        [
            'Scripts/app/modules/MostRecentActivity/models/MostRecentActivityDto',
            'Scripts/app/modules/MostRecentActivity/interfaces/IMostRecentActivityService',
            'Scripts/app/modules/MostRecentActivity/services/MostRecentActivityService',
            'Scripts/app/modules/MostRecentActivity/controllers/MostRecentActivityController'
        ],
        require: ['app.core']
    }, //

    'ScrollPager':
    {
        files:
        [
            'Scripts/app/modules/ScrollPager/directives/ScrollPagerDirective'
        ],
        require: ['app.core']
    }, //

    'app':
    {
        files:
        [
            'Scripts/app/modules/ShellModule/module.angular',
            'Scripts/app/modules/ShellModule/controller/shell',
            'Scripts/app/modules/ShellModule/module.siteMaps',
            'Scripts/app/modules/ShellModule/module.angular.config'
        ],
        require: ['app.core', 'BlockUi', 'Claims', 'Security.Authentication', 'Routing', 'Navigation', 'CompanySearch', 'LRTM']
    }
};



// configure progress report
Module.ModuleLoaderConfig.scriptLoadProgressFunc = (count: number, totalCount: number) => {
    if (window['$']) {

        var perc = 100;
        if (totalCount > 0) {
            perc = Math.round(count / totalCount * 100);
        }

        $('#moduleLoaderProgress-ratio').width(perc + '%');

        if (perc == 100) {
            $('#moduleLoaderProgress').removeClass('visible');
        }
        else {
            $('#moduleLoaderProgress').addClass('visible');
        }
    }
};


require(['Scripts/app/modules/Module/ModuleLoader!app'],
    // success
    function () {
    },
    // error
    function () {
    });